#pragma once 

namespace helper {
namespace demo {

class IDBInstance {
public:
  virtual ~IDBInstance() {}

  struct DBImpl{};
  virtual DBImpl * instance() = 0;

  template<typename T> 
  static T * as(DBImpl * impl){
    return reinterpret_cast<T*>(impl);
  }
};

}//namespace demo 
}//namespace helper
